Distributed systems may comprise hash chains (e.g., blockchains), which are data structures that record data in a fashion analogous to a chain. Each update to the chain creates a new block containing the data and each block is linked to the previous block by a cryptographic function. Blocks are generally appended to the end of the chain and, once in the chain, resist modification so that the cryptographic links in the chain are preserved. Entities (e.g., applications) that receive data from blocks of the chain may check the cryptographic links to test the validity of the chain. Any modification of a block is detected and subject to remedial or other action. Hash chains are generally managed by peer-to-peer networks, which collectively adhere to an established protocol for validating each new block and are designed to be inherently resistant to modification of data. Once recorded, the data in any given block cannot be modified without the alteration of subsequent blocks and the involvement of the network.
A chain generally has no upper limit on its storage capacity. This means that, as blocks are appended, the chain grows without bound. As a result, a chain consumes an increasing amount of storage resources as it is updated. Furthermore, while chains may exist indefinitely, circumstances may change that render the data on the chain vulnerable to security threats. For example, encryption techniques employed on blocks in the chain may become outdated or compromised. If encrypted data in a block needs to be re-encrypted (e.g., because of a comprised key, vulnerability discovered in the encryption technique, or the like), the payload of the block cannot be updated with re-encrypted data without breaking the cryptographic proof of correctness of the chain. This is because the re-encrypted data will produce a different hash for the block, making any blocks forward on the chain no longer refer to the newly updated block. As such, there exists a need for improved techniques of efficiently ensure the continuous security and privacy of data stored on hash chains.